package artid.com.arttogoa.parser;

import java.io.Serializable;
import org.json.JSONObject;

/**
 * 
*    
* 项目名称：ArtworkArtA   
* 类名称   ：OrderInfoParser   
* 类描述   ：订单详情实体类+解析  
* 创建人   ：耿卫斌   
* 创建时间：2016-7-28 下午3:23:11   
*
 */
public class OrderInfoParser extends AppItem implements Serializable{
	private static final long serialVersionUID = 1L;
	private String buyer_id;//买家ID
	private String buyer_nickname;//买家名字
	private String buyer_avatar;//买家头像
	private String realname;//原作者（A端艺术家真实姓名）
	private String goods_price;//价格（商品价格）
	private String pay_time;//付款时间
	private String expressage;//配送方式
	private String cancel_time;//关闭时间（取消时间）
	private String addressinfo;//收货地址
	private String order_id;//订单id
	private String order_sn;//订单编码
	private String add_time;//下单时间（订单生成时间）
	private String finnshed_time;//完成时间
	private String order_state;//商品出售状态订单状态：0已取消；1买家待付款;2待发货;3已发货;4已售出;5全部
	private String shipping_code;//快递单号
	private String goods_name;//作品名（商品名称）
	private String goods_image;//完整图URL（商品主图）
	private String true_name;//收件人姓名
	private String mob_phone;//收件人电话
	private String is_auth;//备案状态0未备案商品，1已备案商品（担保交易）
	private String e_name;//快递公司
	private String shipping_time;//发货时间（配送时间）
	private String ship_address;//发货地址
	@Override
	public void parse(JSONObject obj) {
		// TODO Auto-generated method stub
		if (null == obj) {
			return;
		}
		buyer_id = obj.optString("buyer_id");
		buyer_nickname = obj.optString("buyer_nickname");
		buyer_avatar = obj.optString("buyer_avatar");
		realname = obj.optString("realname");
		goods_price = obj.optString("goods_price");
		pay_time = obj.optString("pay_time");
		expressage = obj.optString("expressage");
		cancel_time = obj.optString("cancel_time");
		addressinfo = obj.optString("addressinfo");
		order_id = obj.optString("order_id");
		order_sn = obj.optString("order_sn");
		add_time = obj.optString("add_time");
		finnshed_time = obj.optString("finnshed_time");
		order_state = obj.optString("order_state");
		shipping_code = obj.optString("shipping_code");
		goods_name = obj.optString("goods_name");
		goods_image = obj.optString("goods_image");
		true_name = obj.optString("true_name");
		mob_phone = obj.optString("mob_phone");
		is_auth = obj.optString("is_auth");
		e_name = obj.optString("e_name");
		shipping_time = obj.optString("shipping_time");
		ship_address = obj.optString("ship_address");
	}
	public String getBuyer_id() {
		return buyer_id;
	}
	public void setBuyer_id(String buyer_id) {
		this.buyer_id = buyer_id;
	}
	public String getBuyer_nickname() {
		return buyer_nickname;
	}
	public void setBuyer_nickname(String buyer_nickname) {
		this.buyer_nickname = buyer_nickname;
	}
	public String getBuyer_avatar() {
		return buyer_avatar;
	}
	public void setBuyer_avatar(String buyer_avatar) {
		this.buyer_avatar = buyer_avatar;
	}
	public String getRealname() {
		return realname;
	}
	public void setRealname(String realname) {
		this.realname = realname;
	}
	public String getGoods_price() {
		return goods_price;
	}
	public void setGoods_price(String goods_price) {
		this.goods_price = goods_price;
	}
	public String getPay_time() {
		return pay_time;
	}
	public void setPay_time(String pay_time) {
		this.pay_time = pay_time;
	}
	public String getExpressage() {
		return expressage;
	}
	public void setExpressage(String expressage) {
		this.expressage = expressage;
	}
	public String getCancel_time() {
		return cancel_time;
	}
	public void setCancel_time(String cancel_time) {
		this.cancel_time = cancel_time;
	}
	public String getAddressinfo() {
		return addressinfo;
	}
	public void setAddressinfo(String addressinfo) {
		this.addressinfo = addressinfo;
	}
	public String getOrder_id() {
		return order_id;
	}
	public void setOrder_id(String order_id) {
		this.order_id = order_id;
	}
	public String getOrder_sn() {
		return order_sn;
	}
	public void setOrder_sn(String order_sn) {
		this.order_sn = order_sn;
	}
	public String getAdd_time() {
		return add_time;
	}
	public void setAdd_time(String add_time) {
		this.add_time = add_time;
	}
	public String getFinnshed_time() {
		return finnshed_time;
	}
	public void setFinnshed_time(String finnshed_time) {
		this.finnshed_time = finnshed_time;
	}
	public String getOrder_state() {
		return order_state;
	}
	public void setOrder_state(String order_state) {
		this.order_state = order_state;
	}
	public String getShipping_code() {
		return shipping_code;
	}
	public void setShipping_code(String shipping_code) {
		this.shipping_code = shipping_code;
	}
	public String getGoods_name() {
		return goods_name;
	}
	public void setGoods_name(String goods_name) {
		this.goods_name = goods_name;
	}
	public String getGoods_image() {
		return goods_image;
	}
	public void setGoods_image(String goods_image) {
		this.goods_image = goods_image;
	}
	public String getTrue_name() {
		return true_name;
	}
	public void setTrue_name(String true_name) {
		this.true_name = true_name;
	}
	public String getMob_phone() {
		return mob_phone;
	}
	public void setMob_phone(String mob_phone) {
		this.mob_phone = mob_phone;
	}
	public String getIs_auth() {
		return is_auth;
	}
	public void setIs_auth(String is_auth) {
		this.is_auth = is_auth;
	}
	public String getE_name() {
		return e_name;
	}
	public void setE_name(String e_name) {
		this.e_name = e_name;
	}
	public String getShipping_time() {
		return shipping_time;
	}
	public void setShipping_time(String shipping_time) {
		this.shipping_time = shipping_time;
	}
	public String getShip_address() {
		return ship_address;
	}
	public void setShip_address(String ship_address) {
		this.ship_address = ship_address;
	}
	public OrderInfoParser() {
		super();
	}
	public OrderInfoParser(String buyer_id, String buyer_nickname,
			String buyer_avatar, String realname, String goods_price,
			String pay_time, String expressage, String cancel_time,
			String addressinfo, String order_id, String order_sn,
			String add_time, String finnshed_time, String order_state,
			String shipping_code, String goods_name, String goods_image,
			String true_name, String mob_phone, String is_auth, String e_name,
			String shipping_time, String ship_address) {
		super();
		this.buyer_id = buyer_id;
		this.buyer_nickname = buyer_nickname;
		this.buyer_avatar = buyer_avatar;
		this.realname = realname;
		this.goods_price = goods_price;
		this.pay_time = pay_time;
		this.expressage = expressage;
		this.cancel_time = cancel_time;
		this.addressinfo = addressinfo;
		this.order_id = order_id;
		this.order_sn = order_sn;
		this.add_time = add_time;
		this.finnshed_time = finnshed_time;
		this.order_state = order_state;
		this.shipping_code = shipping_code;
		this.goods_name = goods_name;
		this.goods_image = goods_image;
		this.true_name = true_name;
		this.mob_phone = mob_phone;
		this.is_auth = is_auth;
		this.e_name = e_name;
		this.shipping_time = shipping_time;
		this.ship_address = ship_address;
	}
	@Override
	public String toString() {
		return "OrderInfoParser [buyer_id=" + buyer_id + ", buyer_nickname="
				+ buyer_nickname + ", buyer_avatar=" + buyer_avatar
				+ ", realname=" + realname + ", goods_price=" + goods_price
				+ ", pay_time=" + pay_time + ", expressage=" + expressage
				+ ", cancel_time=" + cancel_time + ", addressinfo="
				+ addressinfo + ", order_id=" + order_id + ", order_sn="
				+ order_sn + ", add_time=" + add_time + ", finnshed_time="
				+ finnshed_time + ", order_state=" + order_state
				+ ", shipping_code=" + shipping_code + ", goods_name="
				+ goods_name + ", goods_image=" + goods_image + ", true_name="
				+ true_name + ", mob_phone=" + mob_phone + ", is_auth="
				+ is_auth + ", e_name=" + e_name + ", shipping_time="
				+ shipping_time + ", ship_address=" + ship_address + "]";
	}
}
